namespace RBAC.Domain.HXJX
{
    using System;
    using System.ComponentModel.DataAnnotations.Schema;

    /// <summary>
    /// 生产工单主表
    /// </summary>
    [Table("ProductionWorkOrder")]
    public class ProductionWorkOrder : BaseEntity
    {
        /// <summary>
        /// 工单号（唯一）
        /// </summary>
        public string? OrderCode { get; set; }

        /// <summary>
        /// 工单类型（例：生产工单/返工工单等）
        /// </summary>
        public string? OrderType { get; set; }

        /// <summary>
        /// 工单日期
        /// </summary>
        public DateTime? OrderDate { get; set; }

        /// <summary>
        /// 工单状态（开立/已审批/作废等）
        /// </summary>
        public string? OrderStatus { get; set; }

        /// <summary>
        /// 客户Id（可空）
        /// </summary>
        public long? CustomerId { get; set; }

        /// <summary>
        /// 客户名称（冗余展示）
        /// </summary>
        public string? CustomerName { get; set; }

        /// <summary>
        /// 产品Id
        /// </summary>
        public long? ProductId { get; set; }

        /// <summary>
        /// 产品编码
        /// </summary>
        public string? ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string? ProductName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string? Spec { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        public string? Unit { get; set; }

        /// <summary>
        /// 计划生产数量
        /// </summary>
        public decimal? Quantity { get; set; }

        /// <summary>
        /// 交付日期
        /// </summary>
        public DateTime? DeliveryDate { get; set; }

        /// <summary>
        /// 优先级（高/中/低或数值）
        /// </summary>
        public string? Priority { get; set; }

        /// <summary>
        /// 销售人员Id（可空）
        /// </summary>
        public long? SalesPersonId { get; set; }

        /// <summary>
        /// 销售人员名称（冗余展示）
        /// </summary>
        public string? SalesPerson { get; set; }

        /// <summary>
        /// 业务类型（如：自制/外协/采购装配等）
        /// </summary>
        public string? BusinessType { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 审批人
        /// </summary>
        public string? Auditor { get; set; }

        /// <summary>
        /// 审批时间
        /// </summary>
        public DateTime? AuditDate { get; set; }
    }
}
